package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class PWDemo2 {
    public static void main(String[] args) throws FileNotFoundException {
        FileOutputStream fos=new FileOutputStream("pw2.txt");
        OutputStreamWriter ow=new OutputStreamWriter(fos,StandardCharsets.UTF_8);
        BufferedWriter bw=new BufferedWriter(ow);
        PrintWriter pw=new PrintWriter(bw);

        pw.println("你好");
        pw.println("再见");
        System.out.println("写入完毕");
        //pw.close();
    }
}
